package genetic.q3.functions;

import genetic.TreeNode;

public class Constant extends SymbolicRegressionTerminal{
	int val;

	public Constant(int val) {
		this.val = val;
	}

	@Override
	public TreeNode clone() {
		return new Constant(val);
	}

	@Override
	public String getName() {
		return val+"";
	}

	@Override
	public double compute(double xVal) {
		return val;
	}
}
